
#pragma once

class CSceneViewTreeCtrl : public CTreeCtrl
{
// Construction
public:
	CSceneViewTreeCtrl();

// Overrides
protected:
	CImageList*	m_pDragImage;
	BOOL		m_bLDragging;
	HTREEITEM	m_hitemDrag,m_hitemDrop;
	HCURSOR     m_dropCursor,m_noDropCursor;
	virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
	HTREEITEM   CopyItem( HTREEITEM hItem, HTREEITEM htiNewParent, HTREEITEM htiAfter = TVI_LAST);
	HTREEITEM   CopyBranch( HTREEITEM htiBranch, HTREEITEM htiNewParent, HTREEITEM htiAfter = TVI_LAST);
    BOOL        IsDropSource(HTREEITEM hItem);
	HTREEITEM   GetDropTarget(HTREEITEM hItem);


// Implementation
public:
	virtual ~CSceneViewTreeCtrl();
	void OnBeginDrag(NMHDR* pNMHDR, LRESULT* pResult);

protected:
    virtual BOOL PreTranslateMessage(MSG* pMsg);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
    afx_msg void OnCustomDraw(NMHDR* pNMHDR, LRESULT* pResult);

	DECLARE_MESSAGE_MAP()
};
